package chapter03

/**
 * @program lu-scala01
 * @description: 枚举类 & 应用类
 * @author: zhanglu
 * @create: 2022-03-27 19:36:00
 */
object C19_EnumAndApp {

  def main(args: Array[String]): Unit = {
    println(WorkDay.MONDAY)
    println(WorkDay.MONDAY.id)
    println(WorkDay.MONDAY.toString)

    for(s <- WorkDay.values) println(s.id + ":" + s)
  }

}

//枚举类
object WorkDay extends Enumeration{
  val MONDAY = Value(1, "Monday")
  val TUESDAY = Value("Tuesday")
  val WEDNESDAY = Value
}

//应用类
object LuApp extends App{
  println("app start...")
}

//type 关键字 可以定义类型的别名


